package com.kfm.wiki.job;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

//@Component
public class TestJob {


//    @Scheduled(fixedRate = 1L, timeUnit = TimeUnit.SECONDS )
//    public void testJob(){
//        try {
//            Thread.sleep(1500);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
//        System.out.println("定时任务: " + System.currentTimeMillis());
//    }

//    @Scheduled(cron = "0/30 * * * * ?")
//    public void testJob(){
//        System.out.println("定时任务: " + System.currentTimeMillis());
//    }
}
